home *** CD-ROM | disk | FTP | other *** search
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` PixelStorm
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` By Rich Davey (rich@fatal-design.com)
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
- ` My thanks to Madonna for providing
- ` the music during the coding of this !
- ` -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
- sync rate 60
- sync on
- hide mouse
-
- ` Play with the snow value for some rather cool effects!
-
- snow=75; levels=6; w=256; h=256
-
- create bitmap 1,256,256
-
- dim sx(snow)
- dim sy(snow)
-
- for t=0 to snow
- sx(t)=rnd(w)
- sy(t)=rnd(h)
- next t
-
- for o=1 to levels
- make object cube o,o*10
- ghost object on o
- set object o,1,1,0,0
- rotate object o,180,0,0
- fix object pivot o
- next o
-
- position camera 0,0,-10
-
- color backdrop rgb(0,0,50)
- set ambient light 90
-
- do
-
- set current bitmap 1
-
- for t=0 to snow
-
- if sy(t)=h then sy(t)=0
-
- v=rnd(15)+1
-
- ink rgb(0,0,0),1
- dot sx(t),sy(t)
-
- if v<6 then sx(t)=sx(t)+1
- if v>10 then sx(t)=sx(t)-1
-
- sy(t)=sy(t)+1
-
- if sy(t)>h then sy(t)=h
-
- if pixelstorm=1
- ink rgb(0,255,0),1
- else
- ink rgb(255,255,255),1
- endif
-
- dot sx(t),sy(t)
-
- next t
-
- get image 1,0,0,256,256
- set current bitmap 0
-
- for o=1 to levels
- texture object o,1
- next o
-
- xrotate object 1,wrapvalue(ox+5)
- yrotate object 2,wrapvalue(ox+10)
- zrotate object 3,wrapvalue(ox+15)
- yrotate object 4,wrapvalue(ox+20)
- xrotate object 5,wrapvalue(ox+25)
-
- inc ox
-
- if spacekey()=1 then pixelstorm=1
-
- sync
-
- loop
-
-